package de.baumann.browser.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import de.baumann.browser.R;
import de.baumann.browser.api.net.vo.Order;

/**
 * @author:
 * @date:2018/12/19 16:16
 * @discription: Licence 订单适配器
 */
public class LicenceOrderAdapter extends BaseQuickAdapter<Order, BaseViewHolder> {

    public LicenceOrderAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, Order item) {
        helper.setText(R.id.tvLicenceOrderCode,mContext.getString(R.string.order_code) + item.getOrderId());
        helper.setText(R.id.tvLicenceOrderAmount, item.getOrderAmount());
        String pageMode = item.getPayMode() == 1 ?  mContext.getString(R.string.WeChat_payment) : mContext.getString(R.string.odin_payment);
        helper.setText(R.id.tvLicenceOrderPayMode, pageMode);
        helper.setText(R.id.tvLicenceOrderPayTime, item.getOrderTime());
    }
}
